'/
' GUI Library
' Written by Anton Berlin, 2010.
' 
' =========================================================================
' 
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License as published
' by the Free Software Foundation; either version 3 of the License.
' 
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU General Public License for more details.
' 
' You should have received a copy of the GNU Lesser General Public License
' along with this program; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
'/

superstrict

import "../../framework/Base/Base.bmx"
import "../drawutil/drawutil.bmx"

type GUI_Event extends Base

	'// -------------------------------------------------------------------------------------------------------------
	'// Gadget events.
	'// -------------------------------------------------------------------------------------------------------------
	global EVENT_NONE:short = 0;
	global EVENT_INVOKE_METHOD:short = 1;
	
	'// -------------------------------------------------------------------------------------------------------------
	'// Create, setup and return a new GUI_Event object.
	'// -------------------------------------------------------------------------------------------------------------
	function create:GUI_Event(t:short, m:string, h:object)
	
		local event:GUI_Event = new GUI_Event;
		
		event.m_type = t;
		event.m_methodHook = m;
		event.m_hookedObject = h;
		
		return event;
	
	end function
	
	'// -------------------------------------------------------------------------------------------------------------
	'// The type of event this is.
	'// -------------------------------------------------------------------------------------------------------------
	field m_type:short = EVENT_NONE;
	
	'// -------------------------------------------------------------------------------------------------------------
	'// Used to invoke methods.
	'// -------------------------------------------------------------------------------------------------------------
	field m_methodHook:string;
	field m_hookedObject:object;

end type

